package cn.tedu.egmvcboot.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Getter
@ToString
public class UserArticleDTO {
    @ApiModelProperty(value = "文章标题",required = true,example = "标题")
    @NotBlank(message = "标题不能为空白，长度为1-20")
//    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{1,20}$",message = "标题不能为空白，长度为1-20")
    @Size(min = 1,max = 20,message = "标题为1-20个字符")
    private String title;
    @ApiModelProperty(value = "文章内容",required = true,example = "内容")
    @NotBlank(message = "内容不能为空白，长度为10-500")
//    @Pattern(regexp = "^[.]{10,500}$",message = "内容不能为空白，长度为10-500")
    private String content;
}
